﻿@model OSBLE.Models.Courses.CourseUser
@using OSBLE.Models

@{
    ViewBag.Title = "Add User";
}

<h2>Add User By Email</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        <div class="editor-label">
            @Html.LabelFor(model => model.UserProfileID, "Email Address (may be comma seperated)")
            @Helpers.CreateToolTip(ToolTips.RosterEmail) 
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.UserProfile.UserName)
            @Html.ValidationMessageFor(model => model.UserProfile.UserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AbstractRoleID, "Course Role")
            @Helpers.CreateToolTip(ToolTips.RosterRole) 
        </div>
        <div class="editor-field">
            @Html.DropDownList("AbstractRoleID", String.Empty)
            @Html.ValidationMessageFor(model => model.AbstractRoleID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Section)
            @Helpers.CreateToolTip(ToolTips.RosterSection) 
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Section, "0")
            @Html.ValidationMessageFor(model => model.Section)
        </div>

        <p>
            <input type="submit" value="Add User" />
        </p>
}

<div>
    @Html.ActionLink("Back to Users", "Index")
</div>
